﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace WuLiu.Spider.BLL
{
    [Serializable]
    public class MatchHtmlTagCollection : CollectionBase
    {
        public MatchHtmlTag this[int index]
        {
            get
            {
                return (MatchHtmlTag)this.List[index];
            }
        }

        public int Add(MatchHtmlTag item)
        {
            return this.List.Add(item);
        }

        public MatchHtmlTag Get(string name)
        {
            foreach (MatchHtmlTag item in this.List)
            {
                if (string.IsNullOrEmpty(item.HtmlTag))
                {
                    continue;
                }

                if (string.Compare(item.HtmlTag, name, true) == 0)
                {
                    return item;
                }
            }
            return null;
        }
    }
}
